1. Field of the Invention
The present invention relates to a motor controller, and more particularly, it relates to a motor controller having a function which prevents the falling of a shaft when a power supply to the motor is turned on.
2. Description of the Related Art
The Z shaft of a vertical machining center or a Y shaft of a horizontal machining center are commonly referred to as “gravity shafts”. A gravity shaft is shaft which falls when the power supplied to a motor for driving this gravity shaft is turned off. To account for this, for example, a mechanical brake is provided to prevent the falling of the gravity shaft. However, in order to prevent the falling of the gravity shaft, it is necessary to not only provide, for example, the mechanical brake, but also to control the on/off timing of a motor power supply signal and the on/off timing of a brake signal.
FIG. 4 shows the on/off timing of the brake signal and the on/off timing of the motor power supply signal at the start and cutoff of the supply of power to the motor which drives the gravity shaft. In the graph of FIG. 4, T41 indicates the timing of turning on the power supply signal and T42 indicates the timing of turning off the brake signal in when the motor is in a clamped state when power is first supplied. Moreover, T43 indicates the timing of turning on the brake signal and T44 indicates the timing of turning off the power supply signal when the supply of power to the motor is cut off. As apparent from this graph, when the supply of power to the motor is cut off, a signal for turning on a brake of the gravity shaft is first output (T43), and the power supply to the motor is cut off (T44) after the brake has actuated a motor clamp or the like, thereby preventing the falling of the gravity shaft.
On the other hand, when the motor is first started, the supply of power to the motor is first switched on (T41), and then a signal for turning off the brake of the gravity shaft is output (T42), thereby preventing the falling of the gravity shaft. Normally, because a certain amount of time is required to actuate the brake to bring the gravity shaft into a clamped state, the timing of turning off of the power supply signal must be delayed for a length of time equal T44−T43.
Furthermore, unlike a motor for driving a horizontal shaft, the motor for driving the gravity shaft requires torque to hold a gravity part. Therefore, when power is first supplied to the motor, the gravity shaft will fall until the output torque of the motor equals or exceeds the minimum torque able to hold the gravity part (hereinafter referred to as holding torque). Accordingly, there is a method for compensation by adding a holding torque component to a torque command value. Here, FIG. 5 is a block diagram showing one example of a motor controller to which such a method for compensating for the holding torque component is applied. A motor 54 is driven and controlled in accordance with a velocity command V* calculated by an upper controller (e.g., position control), which is not shown in the diagram. The flow of control is described below.
An encoder 55 detects the position of a rotor of the motor 54. A conversion unit 56 calculates a velocity feedback V from the value of the position detected by the encoder 55. A velocity control unit 51 performs arithmetic operations for, for example, PI control from the velocity feedback V and the velocity command V* input from the upper controller, and calculates a torque command. An arithmetic unit adds, to the torque command, the holding torque component input from a holding torque compensating unit 57 to calculate a torque command value T*. Then, a current control unit 52 calculates an inverter drive command from the torque command value T* and a current feedback I of a current supplied to the motor 54. The current is converted from a direct current to an alternating current in an inverter circuit 53 on the basis of the inverter drive command, and this current is supplied to the motor 54 to drive and control the motor 54.
Japanese Patent Publication Laid-open No. 2007-282435 (Patent Document 1) describes a controller for controlling a motor by a torque command value to which a preset toque compensation value is added when a brake for mechanically holding a motor shaft has released the motor shaft. With this controller, when the brake is released from the motor shaft, the toque compensation value can be added to the torque-command value to suppress a protrude amount wherein a work piece falls more than necessary and protrude from a set position.
In the above-described conventional method for controlling the on/off timing of the brake signal and the on/off timing of the motor power supply signal, the output torque of the motor when power is first supplied is smaller than the holding torque, and the gravity shaft therefore begins to fall. When the gravity shaft falls, the output torque of the motor changes. The amount of the change is determined by an integral component in the arithmetic operation for the PI control used in velocity control as indicated by the velocity control unit 51 in FIG. 5. Thus, the output torque of the motor does not change abruptly, but always changes at a given time constant. As a result, by the time the output torque of the motor becomes equal to the holding torque, the gravity shaft has already fallen in a considerable amount. Torque is then abruptly generated to make up for the amount of this fall, which disadvantageously results in an oscillating torque as shown in FIG. 6.
Furthermore, the method for compensating for the holding torque component described as a conventional technique is based on the assumption that the holding torque component is constant. First, the application of this method to a normal gravity shaft is considered. Here, one example of the configuration of the gravity shaft is shown in FIG. 7. In the diagram of FIG. 7, the gravity shaft includes a ball screw 73 attached in the direction of gravity, a spindle head 74 movable along the ball screw 73, a motor 71 for driving and controlling the spindle head 74, and a brake 72 provided to prevent the spindle head 74 from falling. When the spindle head 74 vertically moves, the holding torque is not changed by its position. Thus, an appropriate compensation can be made by the method for compensating for the holding torque component (constant value).
However, in the case of a rotation shaft of a rotary table mounted on a trunnion unit of a five-shaft processing machine of a machine tool, the holding torque varies according to the position of the rotation shaft. Thus, in the conventional method for compensating for the holding torque component of the constant value at the start of supply of power to the motor, the compensation torque is often overcompensated or under-compensated depending on the position of the rotation shaft. Here, the change of motor output torque when the compensation torque is under-compensated is shown in FIG. 8. For example, an under-compensated torque component at time T81 is ΔTo, so that the shaft falls. On the other hand, in the case of overcompensation, the motor output torque is greater than the holding torque, and the shaft rises for a moment. That is to say, the problem is that if the compensation torque is not properly set, the behavior of the gravity shaft at the start of power application to the motor is unstable.
Moreover, when a work piece is mounted on the rotary table, the holding torque changes not only depending on the position of the work piece, but also depending on the weight, shape, or mounting position of the work piece. There is therefore also in such situations a problem of unstable behavior of the gravity shaft when power is first supplied to the motor.